package day_2022_4_to_7.day48;

import java.util.Scanner;

/**
 * 求最长连续数字字串
 * @author haomin
 * @date 2022/04/20 16:05
 **/
public class Day3_1_LongestNumberSubstring {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        if(str == null || str.length() == 0){
            return;
        }
        char[] ret = str.toCharArray();
        int index = 0;
        int max = 0;
        int len = 0;
        for (int i = 0; i < ret.length; i++) {
            if(Character.isDigit(ret[i])){
                len++;
                if(len > max){
                    max = len;
                    index = i;
                }
            }else{
                len = 0;
            }
        }
        for (int i = index-max+1; i <= index; i++) {
            System.out.print(ret[i]);
        }
    }
}